/*
 * Created on Dec 29, 2003
 */
 
package com.unash.z3950.pdu;

/**
 * @author Ashwini Gokhale
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
import com.unash.asn.AsnBitString;
import com.unash.asn.AsnBoolean;
import com.unash.asn.AsnInteger;
import com.unash.asn.AsnOctetString;
import com.unash.asn.AsnVisibleString;

public class InitResponse implements Response{
	private AsnOctetString referenceId;
	private AsnBitString protocolVersion;
	private AsnBitString options;
	private AsnInteger preferredMessageSize;
	private AsnInteger exceptionalRecordSize;
	private AsnBoolean result;
	private AsnVisibleString implementationId;
	private AsnVisibleString implementationName;
	private AsnVisibleString implementationVersion;
	//TODO: userInformationField [EXTERNAL Optional]
	//TODO: otherInformation [OtherInformation Optional]
	
	
	public byte[] accept(Z3950Encoder encoder)
	throws Exception{
		byte[] result = encoder.encode(this); 
		return result;
		
	}//accept
	
	/**
	 * @return
	 */
	public AsnInteger getExceptionalRecordSize() {
		return exceptionalRecordSize;
	}

	/**
	 * @return
	 */
	public AsnVisibleString getImplementationId() {
		return implementationId;
	}

	/**
	 * @return
	 */
	public AsnVisibleString getImplementationName() {
		return implementationName;
	}

	/**
	 * @return
	 */
	public AsnVisibleString getImplementationVersion() {
		return implementationVersion;
	}

	/**
	 * @return
	 */
	public AsnBitString getOptions() {
		return options;
	}

	/**
	 * @return
	 */
	public AsnInteger getPreferredMessageSize() {
		return preferredMessageSize;
	}

	/**
	 * @return
	 */
	public AsnBitString getProtocolVersion() {
		return protocolVersion;
	}

	/**
	 * @return
	 */
	public AsnOctetString getReferenceId() {
		return referenceId;
	}

	/**
	 * @return
	 */
	public AsnBoolean getResult() {
		return result;
	}

	/**
	 * @param integer
	 */
	void setExceptionalRecordSize(AsnInteger integer) {
		exceptionalRecordSize = integer;
	}

	/**
	 * @param string
	 */
	void setImplementationId(AsnVisibleString string) {
		implementationId = string;
	}

	/**
	 * @param string
	 */
	void setImplementationName(AsnVisibleString string) {
		implementationName = string;
	}

	/**
	 * @param string
	 */
	void setImplementationVersion(AsnVisibleString string) {
		implementationVersion = string;
	}

	/**
	 * @param string
	 */
	void setOptions(AsnBitString string) {
		options = string;
	}

	/**
	 * @param integer
	 */
	void setPreferredMessageSize(AsnInteger integer) {
		preferredMessageSize = integer;
	}

	/**
	 * @param string
	 */
	void setProtocolVersion(AsnBitString string) {
		protocolVersion = string;
	}

	/**
	 * @param string
	 */
	void setReferenceId(AsnOctetString string) {
		referenceId = string;
	}

	/**
	 * @param boolean1
	 */
	void setResult(AsnBoolean boolean1) {
		result = boolean1;
	}

}
